﻿using log4net;
using System;

namespace MyJob
{
    public class TestJob
    {
        private readonly ILog logger = LogManager.GetLogger(typeof(TestJob));
        /// <summary>
        /// 获取配置文件
        /// </summary>
        private MyJobConfig config = MyJobConfig.Default;

        /// <summary>
        /// 执行任务
        /// </summary>
        public void Do()
        {
            try
            {
                logger.Info("TestJob任务开始!!!");

                ///业务代码
                logger.Info("配置的字符串:" + config.connStr);

                logger.Info("TestJob任务结束!!!");
            }
            catch (Exception ex)
            {
                logger.Error(ex.ToString());
                throw;
            }
        }
    }
}
